package com.tao.springbootconfigprefile.controller;


import com.tao.springbootconfigprefile.config.DataSourceConfig;
import com.tao.springbootstart.service.RobotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController

public class helloController {
    @Autowired
    DataSourceConfig dataSourceConfig;

    @Autowired
    RobotService robotService;

    @GetMapping("/hello")
    public String hello(){
        System.out.println(dataSourceConfig);


        System.out.println(robotService.sayHello());
        return "helloWorld";
    }
}
